<include file="Public:header"/>
<style type="text/css">
.package_agreement_name{
	font-size: 10px;
}
</style>
<form class="pay_order" action="" method="post" target="_blank">
<div class="custom_order">
	<div class="wrap">
		<h2>支付订单</h2>
		<div class="step">
			<ul class="clearfix step2">
				<li>下单</li>
				<li>付款</li>
				<li>确认需求</li>
				<li>律师处理</li>
				<li>米律审核</li>
				<li>完成交付</li>
			</ul>
		</div>
		<div class="order_box">
			<div class="description">
				<table>
					<tr>
						<td class="name">订单号</td>
						<td>{$info['order_sn']}</td>
					</tr>
					<tr>
						<td class="name">类别</td>
						<td>{$info['category_name']}</td>
					</tr>
					<tr>
						<td class="name">服务名称</td>
						<td>{$info['title']}<eq name="info.is_package" value="1">(<span class="package_agreement_name">{$info['package_agreement_name']}</span>)</eq></td>
					</tr>
					<tr>
						<td class="name">需求描述</td>
						<td>{$info['demand']}</td>
					</tr>
					<tr>
						<td class="name">下单时间</td>
						<td>{$info['datetime']}</td>
					</tr>
				</table>
			</div>
			<div class="title">
				<h3>费用总计</h3>
			</div>
			<div class="price_detail">
				<p class="writing">支付方式</p>
				<ul class="pay-select-list">
					<php>
						if(in_array('web', explode(',', $pay_config['alipay_open']))){
					</php>
					<label>
						<li>
							<input type="radio" name="pay_type" value="alipay" />
							<img src="__PUBLIC__/Images/pay-type-logo/alipay.png" title="{$rs['title']}" />
						</li>
					</label>
					<php>}</php>
					<php>
						if(in_array('web', explode(',', $pay_config['kuaiqian_open']))){
					</php>
					<label>
						<li>
							<input type="radio" name="pay_type" value="kuaiqian" />
							<img src="__PUBLIC__/Images/pay-type-logo/kuaiqian.png" title="{$rs['title']}" />
						</li>
					</label>
					<php>}</php>
					<eq name="pay_config.upmp_is_web_pay" value="1">
					<label>
						<li>
							<input type="radio" name="pay_type" value="upmp" />
							<img src="__PUBLIC__/Images/pay-type-logo/upmp.png" title="{$rs['title']}" />
						</li>
					</label>
					</eq>
					<eq name="pay_config.weixin_is_web_pay" value="1">
						<label>
							<li>
								<input type="radio" name="pay_type" value="weixin" />
								<img src="__PUBLIC__/Images/pay-type-logo/weixin.png" title="{$rs['title']}" />
							</li>
						</label>
					</eq>
					<li style="line-height: 32px;text-align: center" class="jump" href="{:URL('Page/detail?module=pay_help', '', 'page/pay_help')}">
						公司转账
					</li>
				</ul>
				<div class="total_price">
					<p>应付总额：<span>￥{$info['order_amount']}</span></p>
					<input type="submit" value="确认支付" class="btn btn-pay" />
				</div>
			</div>
		</div>
	</div>
</div>
</form>
<script type="text/javascript">
$(document).ready(function () {
	$('.btn-pay').click(function () {
		var url      = $('form.pay_order').attr('action');
		var data     = $('form.pay_order').serialize();
		var pay_type = $('input[name="pay_type"]:checked').val();
		if(!pay_type){
			msgbox('请选择支付方式！', 'warn');
			return false;
		}
		if(pay_type == 'weixin'){
			ajax_win(url, data, 'post', '微信支付');
			return false;
		}
		if(pay_type){
			$('form.pay_order').submit();
			var url = "{:U('UserOrder/detail', array('order_sn' => $info['order_sn']))}";
			_confirm('请在新打开的网银页面进行支付', url, '', '', '完成支付');
			return false;
		}
		return false;
	});
})
</script>
<include file="Public:footer"/>